﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using Microsoft.Xna.Framework;

namespace haptic.src.engine.render
{
    public class Camera
    {
        #region Constructors
        #endregion

        #region Update
        public void Update(GameTime oGameTime)
        {
        }
        public Matrix GetWorldMat(float fScreenWidth, float fScreenHeight, float fDepth)
        {
            Debug.Assert(fDepth > 0.0f);
            Vector2 vRelativeMotion = m_vPosition - m_vInitialPosition;
            return Matrix.CreateTranslation(new Vector3(-(m_vInitialPosition.X + vRelativeMotion.X / fDepth) + fScreenWidth * .5f
                , -(m_vInitialPosition.Y + vRelativeMotion.Y / fDepth) + fScreenHeight * .5f, 1.0f));
        }
        #endregion

        #region Attributes
        public Vector2 m_vPosition = Vector2.Zero;
        public Vector2 m_vInitialPosition = Vector2.Zero;
        #endregion
    }
}
